package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Role;
import com.zzyl.entity.RoleResource;
import com.zzyl.vo.RoleVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper {


    Page<Role> pageroles(Role relo);

    void addRole(Role relo);
    @Select("select distinct resource_no from sys_role_resource where role_id = #{roleId}")
    List<String> findCheckedroles(Long roleId);

    void updateroles(Role relo);

    @Delete("delete from sys_role_resource where role_id=#{id}")
    void deleteRoleResource(Long id);


    void addRoleResource(List<RoleResource> list);

    void deleteRole(String roleId);

    List<RoleVo> findRoleVoListInUserId(@Param("userIds") List<Long> userIds);

    List<RoleVo> xialakuang();
}
